<script setup>
import { computed, ref } from 'vue'
const score = ref([100, 35, 66, 56, 99, 94, 55])

const goodScore = computed(() => {
  // 只执行一次，剩余执行都是缓存
  console.log('执行了')
  return score.value.filter((item) => item >= 90)
})
</script>

<template>
  <div>
    <div>成绩数组:{{ score }}</div>
    <div>优秀的成绩：{{ goodScore }}</div>
    <div>优秀的成绩：{{ goodScore }}</div>
    <div>优秀的成绩：{{ goodScore }}</div>
  </div>
</template>
